{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Python-Tkinter Basics"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "1. Why GUI?\n",
    "    - In simple words to provide simple Graphical User Interface to end users. \n",
    "2. What is Tkinter\n",
    "      - Tkinter is python interface for tk()\n",
    "      - Tkinter first release was in 1991\n",
    "3. Why Tkinter?\n",
    "4. Other packages?"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Widgets:\n",
    "\n",
    "- button\n",
    "- canvas\n",
    "- checkbutton\n",
    "- combobox\n",
    "- entry\n",
    "- frame\n",
    "- label\n",
    "- labelframe\n",
    "- listbox\n",
    "- menu\n",
    "- menubutton\n",
    "- message\n",
    "- notebook\n",
    "- tk_optionMenu\n",
    "- panedwindow\n",
    "- progressbar\n",
    "- radiobutton\n",
    "- scale\n",
    "- scrollbar\n",
    "- separator\n",
    "- sizegrip\n",
    "- spinbox\n",
    "- text\n",
    "- treeview"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Top-level windows:\n",
    "\n",
    "- tk_chooseColorpops  : up a dialog box for the user to select a color.\n",
    "- tk_chooseDirectory  : pops up a dialog box for the user to select a directory.\n",
    "- tk_dialog           : creates a modal dialog and waits for a response.\n",
    "- tk_getOpenFile      : pops up a dialog box for the user to select a file to open.\n",
    "- tk_getSaveFile      : pops up a dialog box for the user to select a file to save.\n",
    "- tk_messageBox       : pops up a message window and waits for a user response.\n",
    "- tk_popup            : posts a popup menu.\n",
    "- toplevel            : creates and manipulates toplevel widgets."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Geometry managers:\n",
    "1. place : which positions widgets at absolute locations\n",
    "2. grid  : which arranges widgets in a grid\n",
    "3. pack  : which packs widgets into a cavity"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Package Installation\n",
    "- pip install tkinter"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Usage"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# python 2.x\n",
    "#from Tkinter import *\n",
    "\n",
    "# python 3.x\n",
    "from tkinter import *"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# add a primary widget\n",
    "root = Tk()\n",
    "\n",
    "# add your frame data here\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# close main loop\n",
    "root.mainloop()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
